<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body>

<div th:fragment="head">
        <div class="cs-north-logo">
            <img th:src="@{/images/log.png}" style="height:50px"/>
        </div>
        <div class="cs-north-info">
            <div class="cs-north-info-item">
                欢迎您！
                <a href="#" class="easyui-menubutton" menu="#mm1">
                    <span th:text="${loginUser.uname}" style="font-weight:bold;cursor:pointer;"/>
                </a>
            </div>
            <div class="cs-north-info-item">
                <select id="skin-nav" class="easyui-combobox" style="width:70px;cursor:pointer;" panelMaxHeight="100px"
                        data-options="editable:false,panelHeight:'auto',onChange:function(n,o){changeSkin();}">
                    <option value="gray">雾霾灰</option>
                    <option value="default">生命蓝</option>
                    <option value="black">碳基黑</option>
                </select>
            </div>
            <div class="cs-north-info-item">
                <i class="fa fa-sign-out" style="cursor:pointer;font-size:28px;color:#95B8E7" title="退出" onclick="logout();"></i>
            </div>
        </div>

        <div id="mm1" class="easyui-menu" style="width:100px;">
            <!--<div data-options="iconCls:'icon-save'">我的设置</div>-->
            <div onclick="javascript:$('#changePwdDlg').dialog('open');" iconCls="icon-lock">更改密码</div>
            <!--<div onclick="javascript:innerFrameLogin();" iconCls="icon-lock">内部登录</div>-->
        </div>

        <div id="changePwdDlg" class="easyui-dialog" title="更改密码" style="width:300px;height:220px;padding:10px"
             data-options="modal:true,closed:true,
                    cache: false,
                    iconCls: 'icon-edit',
                    onClose : function() {
                    },
                    buttons: [{
                        text:'保存',
                        iconCls:'icon-ok',
                        handler:function(){
                            changePwd();
                        }
                    },{
                        text:'取消',
                        iconCls:'icon-cancel',
                        handler:function(){
                            $('#changePwdDlg').dialog('close');
                        }
                    }]
                ">
           <form id="changePwdForm">
                <div style="margin-bottom:10px">
                    <input id="oldPwd" class="easyui-passwordbox" style="width:100%;height:34px;padding:10px"
                           data-options="prompt:'旧密码',iconWidth:28,required:true,validType:'maxLength[30]'"/>
                </div>
                <div style="margin-bottom:10px">
                    <input id="newPwd" class="easyui-passwordbox" style="width:100%;height:34px;padding:10px"
                           data-options="prompt:'新密码',iconWidth:28,required:true,validType:['notEq[\'#oldPwd\']','maxLength[30]']"/>
                </div>
                <div>
                    <input class="easyui-passwordbox" style="width:100%;height:34px;padding:10px" validType="confirmPass['#newPwd']"
                           data-options="prompt:'确认新密码',iconWidth:28,required:true"/>
                </div>
           </form>
        </div>

    <div id="innerFrameLoginDlg" class="easyui-dialog" title="凭证失效，请重新登录" style="width:300px;height:190px;padding:10px"
         data-options="modal:true,closed:true,closable:false,
                    cache: false,
                    iconCls: 'icon-lock',
                    onClose : function() {
                    },
                    onOpen:function(){

                    },
                    buttons: [{
                        text:'登录',
                        iconCls:'icon-ok',
                        handler:function(){
                            innerFrameLoginSubmit();
                        }
                    }]
                ">
        <form id="innerFrameLoginForm">
            <div style="margin-bottom:10px">
                <input type="hidden" id="loginId" th:value="${loginUser.uid}"/>
                <input type="hidden" id="loginName" th:value="${loginUser.uname}"/>
                当前登录名为：<span th:text="${loginUser.uname}" style="font-weight: bold;font-size: 16px"/>
            </div>
            <div style="margin-bottom:10px">
                <input id="loginPwd" class="easyui-passwordbox" style="width:100%;height:34px;padding:10px"
                       data-options="prompt:'请输入密码',iconWidth:28,required:true,validType:'maxLength[30]'"/>
            </div>
        </form>
    </div>

</div>


</body>
</html>